What is the difference between DECIMAL and FLOAT?
765
20-Aug-2025
Updated on 21-Aug-2025
Anubhav Kumar
20-Aug-2025Note:
DECIMAL/NUMERICfor financial or exact values.FLOAT/REALfor large ranges, scientific/engineering calculations, or when tiny precision errors are acceptable.MONEYFixed 4 decimal places, convenient for currency but less flexible than DECIMAL.DECIMAL(p, s)
Example:
DECIMAL(5,2)→ max 5 digits, 2 after decimal.123.45exactly.FLOAT / REAL
Example:
FLOATmight store123.45as123.45000076293945.MONEY / SMALLMONEY
Example:
MONEYrange ≈-922,337,203,685,477.5808to+922,337,203,685,477.5807.SMALLMONEYrange ≈-214,748.3648to+214,748.3647.